@import './base.css';
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 自定义样式 */
@layer base {
  html {
    scroll-behavior: smooth;
  }

  body {
    @apply bg-dark-bg text-dark-text font-sans;
    overflow-x: hidden;
  }

  * {
    scroll-behavior: smooth;
  }
}

@layer components {
  .gradient-text {
    @apply bg-gradient-to-r from-accent-blue to-purple-500 bg-clip-text text-transparent;
  }

  .card-hover {
    @apply transition-all duration-300 hover:transform hover:-translate-y-2 hover:shadow-2xl hover:shadow-accent-blue/20;
  }

  .btn-primary {
    @apply bg-trae-green hover:bg-emerald-600 text-white px-6 py-3 rounded-lg transition-all duration-300 font-medium;
  }

  .btn-secondary {
    @apply border border-dark-border hover:border-trae-green text-dark-text hover:text-trae-green px-6 py-3 rounded-lg transition-all duration-300;
  }

  /* 文本截断 */
  .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 苹果风格的毛玻璃效果 */
  .glass-effect {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* 苹果风格的阴影 */
  .apple-shadow {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }

  .apple-shadow-hover {
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  @apply bg-dark-secondary;
}

::-webkit-scrollbar-thumb {
  @apply bg-dark-border rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-accent-blue;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 响应式网格 */
.projects-grid {
  @apply grid gap-6;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
}
